﻿using System.Collections.Generic;
using System.Linq;
using Coleotrack.Core;
using Coleotrack.Data;
using Coleotrack.Data.Contracts;

namespace Coleotrack.Service.Contracts
{
    public interface IDataService<T> where T:Entity
    {
        INHibernateUnitOfWork UnitOfWork { get; }

        T Find(int id);
        IEnumerable<T> All();
        int Count();
        IQueryable<T> Select();
        void Insert(T entity);
        void Delete(T entity);
        void Evict(T entity);
    }
}
